﻿define('person',
    ['ko' ],
 function (ko) {
     var person = function () {
         var self = this;
         self.id = ko.observable();
         self.idnp = ko.observable().extend({ validationEvent: "log: idnp" });
         self.lastName = ko.observable().extend({ validationEvent: "log: lastName" });
         self.firsName = ko.observable().extend({ validationEvent: "log: firsName" });
         self.dateBirth = ko.observable();

         self.load = function (d) {
             self.id(d.id);
             self.idnp(d.idnp);
             self.lastName(d.lastName);
             self.firsName(d.firsName);
             self.dateBirth(d.createdOn);
         };
         
     };

     return person;
 });